home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
mail
/
readers
/
mailx-5.003
/
mailx-5.5-kw.diff
Wrap
Text File
|
1995-05-30
|
15KB
|
545 lines
Only in mailx-5.5: Makefile.orig
diff -cr mailx-5.5/README mailx-5.5-kw/README
*** mailx-5.5/README Tue May 30 01:12:03 1995
--- mailx-5.5-kw/README Tue May 30 01:35:21 1995
***************
*** 1,23 ****
- These sources are from Mailx "5.5 6/1/90" in the NetBSD-current
- release. NetBSD-current is also the release that all of the Debian
- network utilities are taken from, and is widely regarded as the best
- of the millions of BSD distributions out there. (By "widely
- regarded", I mean that it's my favorite. :-)
-
- If you had the mailx package from Debian 0.91 (or previous version)
- installed, you should de-install it before installing this version.
- Why? Because NetBSD has renamed the files "Mail.help",
- "Mail.tildehelp", and "Mail.rc" to use small "m"s. To be consistent,
- this package also looks for small "m"s. Therefore, you'll want to
- erase the files with the capital "M"s.
-
- There is an old version of mailx which has been modified to retrieve
- mail using POP. These sources are in /afs/gza.com/misc/popmail. I am
- integrating the POP support code into these sources. However, I don't
- want to distribute the POP patch until the current (small) patch has
- been more tested.
! Have a nice day.
! -Sal Valente. <svalente@athena.mit.edu>
--- 1,68 ----
+ mailx-5.5-kw 5/30/95
! WHAT'S IN THIS PATCH
+ There are a bunch of little features, common in System V and SunOS
+ versions of mailx, that are missing from the NetBSD-based version
+ distributed with Linux. This patch attempts to fill in some of what's
+ missing.
+
+ Changes from debian mailx-5.5 include:
+
+ 5/4/95:
+
+ -- interpret prompt variable
+ -- interpret ~a and ~A tilde escapes
+ -- updated tildehelp list
+ -- changed mail.rc to ignore nothing (just my personal preference)
+ -- accept From lines with times of the form hh:mm (formerly took only hh:mm:ss)
+
+ 5/7/95:
+
+ -- Save (S) command saves to mailbox named after author
+ -- take startup commands from file named by environment variable MAILRC
+
+ 5/30/95:
+
+ -- -H switch for header summary only
+
+ Still to be done:
+
+ -- pipe ~p output through PAGER (see type1 in cmd1.c for an example)
+ -- save (s) by default to MBOX (instead of "No file specified.")
+ -- ~q should save to dead.letter, ~x is not known
+ -- update man page
+ -- allnet and showto ("showto" shows recipient instead of sender if sender
+ is current user)
+
+ Possibly difficult:
+
+ -- interpret editheaders variable as in SunOS version
+
+ Bugs:
+
+ -- ~a,~A tilde escapes leave an extra trailing blank on each line
+ -- to conform to original style, I should really be using char *cp
+ instead of new variables sig and prompt to be looking up variables
+ -- -H switch implementation is kind of gross. grep for "hdronly" in
+ source files; much room for improvement!
+
+
+ HOW TO INSTALL
+
+ Apply Sal Valente's debian patch first, so:
+
+ tar xvfz mailx-5.5.tar.gz
+ cd mailx-5.5
+ zcat ../mailx-5.5.debian.diff.gz | patch -p1
+ zcat ../mailx-5.5-kw.diff.gz | patch -p1
+ make
+
+ Or you may wish to just uncompress the diff file and pick and choose
+ the changes that you like.
+
+
+ AUTHOR
+
+ Ken Whang <Kenneth.C.Whang-1@umn.edu>
Only in mailx-5.5-kw: README.debian
Only in mailx-5.5: README.orig
Only in mailx-5.5-kw: TO-DO
diff -cr mailx-5.5/cmd1.c mailx-5.5-kw/cmd1.c
*** mailx-5.5/cmd1.c Fri Dec 17 01:13:00 1993
--- mailx-5.5-kw/cmd1.c Tue May 30 00:41:35 1995
***************
*** 44,49 ****
--- 44,51 ----
* User commands.
*/
+ extern char hdronly;
+
/*
* Print the current active headings.
* Don't change dot if invoker didn't give an argument.
***************
*** 177,183 ****
/*
* Bletch!
*/
! curind = dot == mp ? '>' : ' ';
dispc = ' ';
if (mp->m_flag & MSAVED)
dispc = '*';
--- 179,185 ----
/*
* Bletch!
*/
! curind = (dot == mp) && !hdronly ? '>' : ' ';
dispc = ' ';
if (mp->m_flag & MSAVED)
dispc = '*';
***************
*** 194,199 ****
--- 196,205 ----
subjlen = screenwidth - 50 - strlen(wcount);
name = value("show-rcpt") != NOSTR ?
skin(hfield("to", mp)) : nameof(mp, 0);
+ /*
+ name = (value("show-rcpt") != NOSTR)||(value("showto") != NOSTR) ?
+ skin(hfield("to", mp)) : nameof(mp, 0);
+ */
if (subjline == NOSTR || subjlen < 0) /* pretty pathetic */
printf("%c%c%3d %-20.20s %16.16s %s\n",
curind, dispc, mesg, name, hl.l_date, wcount);
diff -cr mailx-5.5/cmd2.c mailx-5.5-kw/cmd2.c
*** mailx-5.5/cmd2.c Fri Dec 17 01:13:00 1993
--- mailx-5.5-kw/cmd2.c Sat May 6 23:49:48 1995
***************
*** 137,142 ****
--- 137,168 ----
}
/*
+ * Save a message in a file named after author (or, if "showto" is set and
+ * from current user, the recipient -- not implemented). Mark the message
+ * as saved so we can discard when the user quits.
+ */
+ Save(msgvec)
+ int *msgvec;
+ {
+ struct message *mp;
+ char *cp, *name;
+
+ mp = &message[msgvec[0]-1];
+ /*
+ name = value("show-rcpt") != NOSTR ?
+ skin(hfield("to", mp)) : nameof(mp, 0);
+ name = (value("show-rcpt") != NOSTR)||(value("showto") != NOSTR) ?
+ skin(hfield("to", mp)) : nameof(mp, 0);
+ */
+ name = nameof(mp, 0);
+
+ if ((cp = strchr(name, '@')) != NULL)
+ *cp = '\0'; /* remove trailing @host.domain */
+
+ return save1(name, 1, "save", saveignore);
+ }
+
+ /*
* Copy a message to a file without affected its saved-ness
*/
copycmd(str)
diff -cr mailx-5.5/cmdtab.c mailx-5.5-kw/cmdtab.c
*** mailx-5.5/cmdtab.c Fri Dec 17 01:13:00 1993
--- mailx-5.5-kw/cmdtab.c Sat May 6 22:03:25 1995
***************
*** 45,51 ****
*/
extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir();
! extern int save(), help(), headers(), pdot(), respond(), editor();
extern int quitcmd(), rexit(), pcmdlist(), sendmail(), from(), copycmd();
extern int messize(), psalloc(), deltype(), unset(), set(), source();
extern int pversion(), group(), top(), core(), null(), stouch(), visual();
--- 45,51 ----
*/
extern int type(), preserve(), delete(), undelete(), next(), shell(), schdir();
! extern int save(), Save(), help(), headers(), pdot(), respond(), editor();
extern int quitcmd(), rexit(), pcmdlist(), sendmail(), from(), copycmd();
extern int messize(), psalloc(), deltype(), unset(), set(), source();
extern int pversion(), group(), top(), core(), null(), stouch(), visual();
***************
*** 83,88 ****
--- 83,89 ----
"chdir", schdir, M|RAWLIST, 0, 1,
"cd", schdir, M|RAWLIST, 0, 1,
"save", save, STRLIST, 0, 0,
+ "Save", Save, MSGLIST, 0, 0,
"source", source, M|RAWLIST, 1, 1,
"set", set, M|RAWLIST, 0, 1000,
"shell", dosh, I|NOLIST, 0, 0,
diff -cr mailx-5.5/collect.c mailx-5.5-kw/collect.c
*** mailx-5.5/collect.c Tue May 30 01:12:03 1995
--- mailx-5.5-kw/collect.c Sat May 6 23:36:52 1995
***************
*** 84,89 ****
--- 84,91 ----
int omask;
void collint(), collhup(), collstop();
+ char *defaultsig = "";
+
collf = NULL;
/*
* Start catching signals from here, but we're still die on interrupts
***************
*** 361,366 ****
--- 363,380 ----
*/
rewind(collf);
mesedit(collf, c);
+ goto cont;
+ case 'A':
+ case 'a':
+ /*
+ * Insert signature ("autograph").
+ * 'A' means to use Sign
+ * 'a' means to use sign
+ */
+ if ((cp = value(c == 'A' ? "Sign" : "sign")) == NOSTR)
+ cp = defaultsig;
+ printf("%s\n", cp);
+ putline(collf, cp);
goto cont;
}
}
Only in mailx-5.5: collect.c.orig
Only in mailx-5.5: def.h.orig
diff -cr mailx-5.5/head.c mailx-5.5-kw/head.c
*** mailx-5.5/head.c Fri Dec 17 01:13:00 1993
--- mailx-5.5-kw/head.c Thu May 4 18:14:21 1995
***************
*** 160,172 ****
* 'N' A new line
*/
char ctype[] = "Aaa Aaa O0 00:00:00 0000";
char tmztype[] = "Aaa Aaa O0 00:00:00 AAA 0000";
isdate(date)
char date[];
{
! return cmatch(date, ctype) || cmatch(date, tmztype);
}
/*
--- 160,175 ----
* 'N' A new line
*/
char ctype[] = "Aaa Aaa O0 00:00:00 0000";
+ char ctype2[] = "Aaa Aaa O0 00:00 0000";
char tmztype[] = "Aaa Aaa O0 00:00:00 AAA 0000";
+ char tmztype2[] = "Aaa Aaa O0 00:00 AAA 0000";
isdate(date)
char date[];
{
! return cmatch(date, ctype) || cmatch(date, tmztype)
! || cmatch(date, ctype2) || cmatch(date, tmztype2);
}
/*
diff -cr mailx-5.5/lex.c mailx-5.5-kw/lex.c
*** mailx-5.5/lex.c Fri Dec 17 01:13:00 1993
--- mailx-5.5-kw/lex.c Mon May 29 19:44:57 1995
***************
*** 46,52 ****
* Lexical processing of commands.
*/
! char *prompt = "& ";
/*
* Set up editing on the given file name.
--- 46,53 ----
* Lexical processing of commands.
*/
! char *defaultprompt = "& ", *prompt;
! extern char hdronly;
/*
* Set up editing on the given file name.
***************
*** 146,152 ****
sawcom = 0;
if (!edit && msgCount == 0) {
nomail:
! fprintf(stderr, "No mail for %s\n", who);
return -1;
}
return(0);
--- 147,153 ----
sawcom = 0;
if (!edit && msgCount == 0) {
nomail:
! if (!hdronly) fprintf(stderr, "No mail for %s\n", who);
return -1;
}
return(0);
***************
*** 183,188 ****
--- 184,191 ----
*/
if (!sourcing && value("interactive") != NOSTR) {
reset_on_stop = 1;
+ if ((prompt = value("prompt")) == NOSTR)
+ prompt = defaultprompt;
printf(prompt);
}
fflush(stdout);
***************
*** 597,618 ****
ename = zname;
}
}
! printf("\"%s\": ", ename);
! if (msgCount == 1)
! printf("1 message");
! else
! printf("%d messages", msgCount);
! if (n > 0)
! printf(" %d new", n);
! if (u-n > 0)
! printf(" %d unread", u);
! if (d > 0)
! printf(" %d deleted", d);
! if (s > 0)
! printf(" %d saved", s);
! if (readonly)
! printf(" [Read only]");
! printf("\n");
return(mdot);
}
--- 600,623 ----
ename = zname;
}
}
! if (!hdronly) {
! printf("\"%s\": ", ename);
! if (msgCount == 1)
! printf("1 message");
! else
! printf("%d messages", msgCount);
! if (n > 0)
! printf(" %d new", n);
! if (u-n > 0)
! printf(" %d unread", u);
! if (d > 0)
! printf(" %d deleted", d);
! if (s > 0)
! printf(" %d saved", s);
! if (readonly)
! printf(" [Read only]");
! printf("\n");
! }
return(mdot);
}
Only in mailx-5.5: mail.1.orig
diff -cr mailx-5.5/main.c mailx-5.5-kw/main.c
*** mailx-5.5/main.c Sun Mar 20 14:39:10 1994
--- mailx-5.5-kw/main.c Mon May 29 19:39:29 1995
***************
*** 51,56 ****
--- 51,57 ----
* Startup -- interface with user.
*/
+ char hdronly = 0;
jmp_buf hdrjmp;
main(argc, argv)
***************
*** 60,65 ****
--- 61,67 ----
struct name *to, *cc, *bcc, *smopts;
char *subject;
char *ef;
+ char *mailrc;
char nosrc = 0;
void hdrstop();
sig_t prevint;
***************
*** 89,95 ****
bcc = NIL;
smopts = NIL;
subject = NOSTR;
! while ((i = getopt(argc, argv, "INT:b:c:dfins:u:v")) != EOF) {
switch (i) {
case 'T':
/*
--- 91,97 ----
bcc = NIL;
smopts = NIL;
subject = NOSTR;
! while ((i = getopt(argc, argv, "INHT:b:c:dfins:u:v")) != EOF) {
switch (i) {
case 'T':
/*
***************
*** 153,158 ****
--- 155,166 ----
*/
assign("noheader", "");
break;
+ case 'H':
+ /*
+ * Print initial headers and exit.
+ */
+ assign("quiet", "");
+ hdronly++;
case 'v':
/*
* Send mailer verbose flag
***************
*** 179,188 ****
break;
case '?':
fputs("\
! Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...\n\
[- sendmail-options ...]\n\
! mail [-iInNv] -f [name]\n\
! mail [-iInNv] [-u user]\n",
stderr);
exit(1);
}
--- 187,196 ----
break;
case '?':
fputs("\
! Usage: mail [-iIHnv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...\n\
[- sendmail-options ...]\n\
! mail [-iIHnNv] -f [name]\n\
! mail [-iIHnNv] [-u user]\n",
stderr);
exit(1);
}
***************
*** 213,219 ****
* Expand returns a savestr, but load only uses the file name
* for fopen, so it's safe to do this.
*/
! load(expand("~/.mailrc"));
if (!rcvmode) {
mail(to, cc, bcc, smopts, subject);
/*
--- 221,227 ----
* Expand returns a savestr, but load only uses the file name
* for fopen, so it's safe to do this.
*/
! load(expand( (mailrc=value("MAILRC"))==NOSTR ? "~/.mailrc" : mailrc));
if (!rcvmode) {
mail(to, cc, bcc, smopts, subject);
/*
***************
*** 242,252 ****
fflush(stdout);
signal(SIGINT, prevint);
}
! commands();
signal(SIGHUP, SIG_IGN);
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
! quit();
exit(0);
}
--- 250,260 ----
fflush(stdout);
signal(SIGINT, prevint);
}
! if (!hdronly) commands();
signal(SIGHUP, SIG_IGN);
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
! if (!hdronly) quit();
exit(0);
}
diff -cr mailx-5.5/misc/mail.rc mailx-5.5-kw/misc/mail.rc
*** mailx-5.5/misc/mail.rc Fri Dec 17 01:13:00 1993
--- mailx-5.5-kw/misc/mail.rc Thu May 4 20:24:40 1995
***************
*** 1,2 ****
set append dot save asksub
! ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via
--- 1,2 ----
set append dot save asksub
! # ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via
diff -cr mailx-5.5/misc/mail.tildehelp mailx-5.5-kw/misc/mail.tildehelp
*** mailx-5.5/misc/mail.tildehelp Fri Dec 17 01:14:00 1993
--- mailx-5.5-kw/misc/mail.tildehelp Thu May 4 20:23:39 1995
***************
*** 1,6 ****
--- 1,7 ----
-----------------------------------------------------------
The following ~ escapes are defined:
~~ Quote a single tilde
+ ~a,~A Autograph (insert 'sign','Sign' variable)
~b users Add users to "blind" cc list
~c users Add users to cc list
~d Read in dead.letter
Only in mailx-5.5: pathnames.h.orig
Only in mailx-5.5: rcv.h.orig
diff -cr mailx-5.5/version.c mailx-5.5-kw/version.c
*** mailx-5.5/version.c Fri Dec 17 01:13:00 1993
--- mailx-5.5-kw/version.c Tue May 30 00:43:56 1995
***************
*** 40,43 ****
* Just keep track of the date/sid of this version of Mail.
* Load this file first to get a "total" Mail version.
*/
! char *version = "5.5 6/1/90";
--- 40,44 ----
* Just keep track of the date/sid of this version of Mail.
* Load this file first to get a "total" Mail version.
*/
! /*char *version = "5.5 6/1/90"*/;
! char *version = "5.5-kw 5/30/95";